import request from '@/utils/request'



// 查询门店回收列表
export function listCollect(query) {
  return request({
    url: '/store/collect/list',
    method: 'get',
    params: query
  })
}


// 查询门店回收详细
export function getCollect(storeId) {
  return request({
    url: '/store/collect/' + storeId,
    method: 'get'
  })
}

// 新增门店回收
export function addCollect(data) {
  return request({
    url: '/store/collect',
    method: 'post',
    data: data
  })
}

export function addCollectList(data) {
  return request({
    url: '/store/collect/adds',
    method: 'post',
    data: data
  })
}

// 修改门店回收
export function updateCollect(data) {
  return request({
    url: '/store/collect',
    method: 'put',
    data: data
  })
}

// 删除门店回收
export function delCollect(storeId) {
  return request({
    url: '/store/collect/' + storeId,
    method: 'delete'
  })
}

export function selectListByIds(storeIds) {
  return request({
    url: '/store/collect/list/' + storeIds,
    method: 'get'
  })
}

// 导出门店回收
export function exportCollect(query) {
  return request({
    url: '/store/collect/export',
    method: 'get',
    params: query
  })
}


//使用按钮
export function useCollectStatus(storeId) {
  return request({
    url: '/store/collect/use/' + storeId,
    method: 'get'
  })
}

//收货按钮
export function takeCollectStatus(storeId) {
  return request({
    url: '/store/collect/take/' + storeId,
    method: 'get'
  })
}

//关闭按钮
export function closeCollectStatus(storeId) {
  return request({
    url: '/store/collect/close/' + storeId,
    method: 'get'
  })
}

//审核按钮
export function audioCollectBillStatus(storeId) {
  return request({
    url: '/store/collect/audit/' + storeId,
    method: 'get'
  })
}

export function updateHayPay(storeId) {
  return request({
    url: '/store/collect/has/pay/' + storeId,
    method: 'get'
  })
}

//批量审核
export function audioBillStatusList(ids) {
  return request({
    url: '/store/collect/audit/list/' + ids,
    method: 'get'
  })
}

//批量收货
export function takeCollectStatusByList(data) {
  return request({
    url: '/store/collect/take/list',
    method: 'post',
    data: data
  })
}

//平均值
export function listAvgUseTime() {
  return request({
    url: '/store/collect/avgUseTime',
    method: 'get'
  })
}

export function updateHotMobile(name) {
  return request({
    url: '/store/collect/editHotMobile',
    method: 'post',
    data: {name: name}
  })
}

export function queryHotMobile() {
  return request({
    url: '/store/collect/queryHotMobile',
    method: 'get'
  })
}

export function queryChatDataPrice() {
  return request({
    url: '/store/collect/chatDataPrice',
    method: 'get'
  })
}
